package com.demo.design.creational.abstractfactory;

public class FactoryMain {
    public static void main(String[] args) {
        InitFactoty dartzon = new DartzonFactory();
        InitFactoty lowan = new LowanFactory();
        System.err.println("===================darzon================");
        System.err.println("水果:" + dartzon.getFruit().getProductName() + "   " + dartzon.getFruit().price().toString() + "元/斤");
        System.err.println("蔬菜:" + dartzon.getVagetable().getProductName() + "   " + dartzon.getVagetable().price().toString() + "元/斤");
        System.err.println("===================lowan================");
        System.err.println("水果:" + lowan.getFruit().getProductName() + "   " + lowan.getFruit().price().toString() + "元/斤");
        System.err.println("蔬菜:" + lowan.getVagetable().getProductName() + "   " + lowan.getVagetable().price().toString() + "元/斤");
    }
}
